package com.videoweb.mapper;

import com.videoweb.entity.Category;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lmr
 * @since 2025-05-17
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    void insertCategory(Category category);

    @Select("SELECT id FROM category WHERE name = #{name} LIMIT 1")
    Long findIdByName(String name);




}
